﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Configuration;
using Microsoft.ApplicationBlocks.Data;
using System.Data;
using System.Data.SqlClient;

using YouHP.Model;
using YouHP.Utility;

namespace YouHP.SqlServerDAL
{
    public class Common
    {
        internal static readonly string ConnStr = ConfigurationManager.AppSettings["WebSQLConnStr"];

        #region Admin 用户

        internal const string AdminSP_AddAdmin = "AddAdminInfo";
        internal const string AdminSP_DelAdmin = "DelAdminInfo";
        internal const string AdminSP_GetAdmin = "GetAdminInfo";
        internal const string AdminSP_UpdateAdmin = "UpdateAdminInfo";

        #endregion

        #region User 用户
        internal const string UserSP_GetUserList = "GetUserList";
        internal const string UserSP_AddUser = "AddUserInfo";
        internal const string UserSP_AddUserEx = "AddUserInfoEx";
        internal const string UserSP_GetUserInfo = "GetUserInfo";   
        internal const string UserSP_UpdateUserProfile = "UpdateUserProfile";
        internal const string UserSP_UpdateUserViewCount = "UpdateUserViewCount";
        internal const string UserSP_UpdateUserAvatar = "UpdateUserAvatar" ;
        internal const string UserSP_UpdateUserLoginTime = "UpdateUserLoginTime";
        internal const string UserSP_ActiveUserByActiveCode = "ActiveUserByActiveCode";
        internal const string UserSP_UpdateUserPassword = "UpdateUserPassword";
        internal const string UserSP_ResetUserPassword = "ResetUserPassword";
        internal const string UserSP_GetUserIdByUserName = "GetUserIdByName";
        internal const string UserSP_AddVisitRecord = "AddVisitRecord";
        internal const string UserSP_GetLattestVisitRecordList = "GetLattestVisitRecordList";
        internal const string UserSP_UpdateVisitRecord = "UpdateVisitRecord";
        internal const string UserSP_UpdateUserLoginState = "UpdateUserLoginState";
        internal const string UserSP_GetRecommendedUserOfDisease = "GetRecommendedUserOfDisease";
        internal const string UserSP_GetRecommendedUserOfDiseaseByeDisName = "RecommendUserOfDiseaseGet";
        internal const string UserSP_GetUserListByCond = "GetUserListByCond";
        internal const string UserSP_GetAdministratorList = "GetAdministratorList";
        internal const string UserSP_UpdateAdministratorToNormal = "UpdateAdministratorToNormal";
        internal const string UserSP_UpdateNormalUserToAdministrator = "UpdateNormalUserToAdministrator";
        internal const string UserSP_AddPostCardInfo = "AddPostCardInfo";
        internal const string UserSP_UpdateUserDeactiveUser = "UpdateUserDeactiveUser";
        #endregion

        #region 病人搜索
        internal const string PatientSP_GetUserListByDiseaseId = "GetUserListByDiseaseId";
        internal const string PatientSP_GetUserListByTreatmentId = "GetUserListByTreatmentId";
        internal const string PatientSP_GetLatestPatientList = "GetLatestPatientList";
        internal const string PatientSP_GetPatientList = "GetPatientList";
        internal const string PatientSP_GetPatientListByDisease = "GetPatientList";
        internal const string PatientSP_GetAllPatientsList = "GetAllPatientsList";
        internal const string PatientSP_GetPatientListByTreatment = "GetPatientListByTreatment";
        internal const string PatientSP_GetPatientListBySymptom = "GetPatientListBySymptom";
        internal const string PatientSP_GetPatientListByAdvanceSearch = "GetPatientListByAdvanceSearchNew";
        #endregion

        #region 地区 Area
        internal const string AreaSP_GetProvinceList = "GetProvinceList";
        internal const string AreaSP_GetAreaListByProvice = "GetAreaListByProvice";
        #endregion

        #region Message 短消息
        internal const string MessageSP_AddMessage = "AddMessage";
        internal const string MessageSP_DelMessage = "DelMessage";
        internal const string MessageSP_GetMessageInfo = "GetMessageInfo";
        internal const string MessageSP_GetMessageList = "GetMessageList";
        internal const string MessageSP_UpdatePmState = "UpdatePmState";
        #endregion

        #region District
        internal const string DistrictSP_AddDistrict = "AddDistrict";
        internal const string DistrictSP_DelDistrict = "DelDistrict";
        internal const string DistrictSP_UpdateDistrict = "UpdateDistrict";
        internal const string DistrictSP_GetDistrict = "GetDistrict";
        internal const string DistrictSP_GetDistrictList = "GetDistrictList";
        #endregion

        #region 疾病
        internal const string DiseaseSP_GetDiseaseList = "GetDiseaseList";
        internal const string DiseaseSP_GetdiseaseListWithPatientInfo = "GetdiseaseListWithPatientInfo";
        internal const string DiseaseSP_GetTopDiseases = "GetTopDiseases";
        internal const string DiseaseSP_AddDisease = "AddDisease";
        internal const string DiseaseSP_UpdateDisease = "UpdateDisease";
        internal const string DiseaseSP_GetDiseaseIdByName = "GetDiseaseIdByName";
        internal const string DiseaseSP_DelDisease = "DelDisease";
        internal const string DiseaseSP_UpdateDiseasePatientCount = "UpdateDiseasePatientCount";
        internal const string DiseaseSP_GetHighIncidenceSymptomsOfDisease = "GetHighIncidenceSymptomsOfDisease";
        internal const string DiseaseSP_GetMostFrequentUsedTreatmentsOfDisease = "GetMostFrequentUsedTreatmentsOfDisease";
        internal const string DiseaseSP_GetPatientLocationDistributionStatOfDisease = "GetPatientLocationDistributionStatOfDisease";
        #endregion

        #region 疾病症状关联
        internal const string DiseaseSP_AddDiseaseSymptom = "AddDiseaseSymptom";
        internal const string DiseaseSP_DelDiseaseSymptoms = "DelDiseaseSymptoms";
        internal const string DiseaseSP_GetDiseaseSymptomList = "GetDiseaseSymptomList";
        internal const string DiseaseSP_GetDiseaseSymptomListByType = "GetDiseaseSymptomListByType";
        internal const string DiseaseSP_GetSelectedSymptomCollect = "GetSelectedSymptomCollect";
        #endregion

        #region 疾病治疗关联
        internal const string DiseaseSP_AddDiseaseTreatment = "AddDiseaseTreatment";
        internal const string DiseaseSP_DelDiseaseTreatments = "DelDiseaseTreatments";
        internal const string DiseaseSP_GetDiseaseTreatmentList = "GetDiseaseTreatmentList";
        #endregion

        #region 疾病实验室指标关联
        internal const string DiseaseSP_AddDiseaseLabcheck = "AddDiseaseLabcheck";
        internal const string DiseaseSP_DelDiseaseLabchecks = "DelDiseaseLabchecks";
        internal const string DiseaseSP_GetDiseaseLabcheckList = "GetDiseaseLabcheckList";
        #endregion

        #region 疾病类型
        internal const string DiseaseSP_AddDiseaseType = "AddDiseaseType";
        internal const string DiseaseSP_DelDiseaseType = "DelDiseaseType";
        internal const string DiseaseSP_UpdateDiseaseType = "UpdateDiseaseType";
        internal const string DiseaseSP_GetDiseaseType = "GetDiseaseType";
        internal const string DiseaseSP_GetDiseaseTypeList = "GetDiseaseTypeList";
        internal const string DiseaseSP_GetDiseaseTreatmentListByTreatmentId = "GetDiseaseTreatmentListByTreatmentId";

        #endregion

        #region 疾病统计
        internal const string DiseaseSP_GetDiseaseStatRegion = "GetDiseaseStatRegion";
        internal const string DiseaseSP_GetDiseaseStatAge = "GetDiseaseStatAge";
        internal const string DiseaseSP_GetDiseaseStatDuration = "GetDiseaseStatDuration";
        internal const string DiseaseSP_GetDiseaseStatSymptom = "GetDiseaseStatSymptom";
        internal const string DiseaseSP_GetDiseaseStatTreatment = "GetDiseaseStatTreatment";
        #endregion

        #region 疾病图表设置
        internal const string DiseaseSP_AddDiseaseGraphSetting = "AddDiseaseGraphSetting";
        internal const string DiseaseSP_UpdateDiseaseGraphSetting = "UpdateDiseaseGraphSetting";
        internal const string DiseaseSP_GetDiseaseGraphSettingInfo = "GetDiseaseGraphSettingInfo";
        #endregion

        #region 治疗
        internal const string TreatmentSP_AddTreatmentInfo = "AddTreatment";
        internal const string TreatmentSP_DelTreatmentInfo = "DelTreatment";
        internal const string TreatmentSP_UpdateTreatment = "UpdateTreatment";
        internal const string TreatmentSP_GetTreatmentInfo = "GetTreatment";
        internal const string TreatmentSP_GetTreatmentList = "GetTreatmentList";
        internal const string TreatmentSP_GetTreatmentListByDisease = "GetTreatmentListByDisease";
        internal const string TreatmentSP_GetTreatmentListWithPatientInfo = "GetTreatmentListWithPatientInfo";
        internal const string TreatmentSP_GetTreatmentListByDiseaseWithPatientInfo = "GetTreatmentListByDiseaseWithPatientInfo";
        internal const string TreatmentSP_GetTreatmentStatDosage = "GetTreatmentStatDosage";
        internal const string TreatmentSP_GetTreatmentStatTaketime = "GetTreatmentStatTaketime";
        internal const string TreatmentSP_GetTreatmentListOrderbyDiseaseId = "GetTreatmentListOrderByDiseaseId";
        #endregion

        #region 医生
        internal const string DoctorSP_GetDoctorById = "GetDoctorById";
        internal const string DoctorSP_GetDoctor = "GetDoctor";
        internal const string DoctorSP_AddDoctor = "AddDoctor";
        internal const string DoctorSP_UpdateDoctor = "UpdateDoctor";
        internal const string DoctorSP_DeleteDoctorById = "DeleteDoctorById";
        internal const string DoctorSP_DeleteDoctor = "DeleteDoctor";
        internal const string DoctorSP_GetDoctorList = "GetDoctorList";
        #endregion

        #region 中药药方
        internal const string PrescriptionSP_GetPrescriptionById = "GetPrescriptionById";
        internal const string PrescriptionSP_GetPrescription = "GetPrescription";
        internal const string PrescriptionSP_AddPrescription = "AddPrescription";
        internal const string PrescriptionSP_UpdatePrescription = "UpdatePrescription";
        internal const string PrescriptionSP_DeletePrescriptionById = "DeletePrescriptionById";
        internal const string PrescriptionSP_DeletePrescription = "DeletePrescription";
        internal const string PrescriptionSP_GetPrescriptionList = "GetPrescriptionList";
        internal const string PrescriptionSP_GetPrescriptionsCountOfDisease = "GetPrescriptionsCountOfDisease";
        #endregion

        #region  病人中药方
        internal const string PatientPrescriptionSP_GetPatientCurrentPrescriptionById = "GetPatientCurrentPrescriptionById";
        internal const string PatientPrescriptionSP_GetPatientCurrentPrescription = "GetPatientCurrentPrescription";
        internal const string PatientPrescriptionSP_AddPatientCurrentPrescription = "AddPatientCurrentPrescription";
        internal const string PatientPrescriptionSP_UpdatePatientCurrentPrescription = "UpdatePatientCurrentPrescription";
        internal const string PatientPrescriptionSP_DeletePatientCurrentPrescriptionById = "DeletePatientCurrentPrescriptionById";
        internal const string PatientPrescriptionSP_DeletePatientCurrentPrescription = "DeletePatientCurrentPrescription";
        internal const string PatientPrescriptionSP_GetPatientCurrentPrescriptionList = "GetPatientCurrentPrescriptionList";
        internal const string PatientPrescriptionSP_GetCurrentPrescriptionCount = "GetCurrentPrescriptionCount";

        internal const string PatientPrescriptionSP_GetPatientPrescriptionHistoryById = "GetPatientPrescriptionHistoryById";
        internal const string PatientPrescriptionSP_GetPatientPrescriptionHistory = "GetPatientPrescriptionHistory";
        internal const string PatientPrescriptionSP_AddPatientPrescriptionHistory = "AddPatientPrescriptionHistory";
        internal const string PatientPrescriptionSP_UpdatePatientPrescriptionHistory = "UpdatePatientPrescriptionHistory";
        internal const string PatientPrescriptionSP_DeletePatientPrescriptionHistoryById = "DeletePatientPrescriptionHistoryById";
        internal const string PatientPrescriptionSP_DeletePatientPrescriptionHistory = "DeletePatientPrescriptionHistory";
        internal const string PatientPrescriptionSP_GetPatientPrescriptionHistoryList = "GetPatientPrescriptionHistoryList";
        #endregion

        #region 药方评论
        internal const string PrescriptionCommentSP_GetPrescriptionCommentById = "GetPrescriptionCommentById";
        internal const string PrescriptionCommentSP_GetPrescriptionComment = "GetPrescriptionComment";
        internal const string PrescriptionCommentSP_AddPrescriptionComment = "AddPrescriptionComment";
        internal const string PrescriptionCommentSP_UpdatePrescriptionComment = "UpdatePrescriptionComment";
        internal const string PrescriptionCommentSP_DeletePrescriptionCommentById = "DeletePrescriptionCommentById";
        internal const string PrescriptionCommentSP_DeletePrescriptionComment = "DeletePrescriptionComment";
        internal const string PrescriptionCommentSP_GetPrescriptionCommentList = "GetPrescriptionCommentList";
        #endregion

        #region 治疗类型
        internal const string TreatmentSP_AddTreatmentType = "AddTreatmentType";
        internal const string TreatmentSP_DelTreatmentType = "DelTreatmentType";
        internal const string TreatmentSP_UpdateTreatmentType = "UpdateTreatmentType";
        internal const string TreatmentSP_GetTreatmentType = "GetTreatmentType";
        internal const string TreatmentSP_GetTreatmentTypeList = "GetTreatmentTypeList";
        #endregion

        #region 症状
        internal const string SymptomSP_AddSymptom = "AddSymptom";
        internal const string SymptomSP_DelSymptom = "DelSymptom";
        internal const string SymptomSP_UpdateSymptom = "UpdateSymptom";
        internal const string SymptomSP_GetSymptom = "GetSymptom";
        internal const string SymptomSP_GetSymptomList = "GetSymptomList";
        internal const string SymptomSP_GetSymptomListWithDiseaseInfo = "GetSymptomListWithDiseaseInfo" ;
        internal const string SymptomSP_GetSymptomListByDisease = "GetSymptomListByDisease";
        internal const string SymptomSP_GetSymptomListByDiseaseWithDiseaseInfo = "GetSymptomListByDiseaseWithDiseaseInfo";
        internal const string SymptomSP_GetSymptomListWithPatientInfo = "GetSymptomListWithPatientInfo";
        internal const string SymptomSP_GetSymptomListByDiseaseWithPatientInfo = "GetSymptomListByDiseaseWithPatientInfo";
        internal const string SymptomSP_GetDiseaseListBySymptomId = "GetDiseaseListBySymptomId";

        #endregion

        #region 症状统计
        internal const string SymptomSP_GetSymptomStatSeverity = "GetSymptomStatSeverity";
        internal const string SymptomSP_GetSymptomStatDisease = "GetSymptomStatDisease";
        #endregion

        #region 症状类型
        internal const string SymptomSP_AddSymptomType = "AddSymptomType";
        internal const string SymptomSP_DelSymptomType = "DelSymptomType";
        internal const string SymptomSP_UpdateSymptomType = "UpdateSymptomType";
        internal const string SymptomSP_GetSymptomType = "GetSymptomType";
        internal const string SymptomSP_GetSymptomTypeList = "GetSymptomTypeList";
        #endregion

        #region  实验室指标
        internal const string LabcheckSP_AddLabcheck = "AddLabcheck";
        internal const string LabcheckSP_DelLabcheck = "DelLabcheck";
        internal const string LabcheckSP_UpdateLabcheck = "UpdateLabcheck";
        internal const string LabcheckSP_GetLabcheck = "GetLabcheck";
        internal const string LabcheckSP_GetLabcheckList = "GetLabcheckList";
        internal const string LabcheckSP_GetLabcheckListByDisease = "GetLabcheckListByDisease";
        #endregion

        #region 病人疾病
        internal const string PatientSP_GetPatientRecord = "GetPatientRecord";
        internal const string PatientSP_AddPatientRecord = "AddPatientRecord";
        internal const string PatientSP_UpdatePatientRecord = "UpdatePatientRecord";
        internal const string PatientSP_UpdatePatientRecord_GraphGeneralPath = "UpdateGraphGeneralPath";
        internal const string PatientSP_UpdatePatientRecord_GraphLabcheckPath = "UpdateGraphLabcheckPath";
        internal const string PatientSP_UpdatePatientRecord_GraphSymptomPath = "UpdateGraphSymptomPath";
        internal const string PatientSP_UpdatePatientRecord_GraphTreamtmentPath = "UpdateGraphTreatmentPath";
        internal const string PatientSymptomSP_GetSymptomByDisease = "GetSymptomListByDisease";

        #endregion

        #region 病人survey
        internal const string PatientSurveySP_GetPatientSurvey = "GetPatientSurvey";
        internal const string PatientSurveySP_AddPatientSurvey = "AddPatientSurvey";
        internal const string PatientSurveySP_UpdatePatientSurvey = "UpdatePatientSurvey";
        internal const string PatientSurveySP_DelPatientSurvey = "DelPatientSurvey";
        internal const string PatientSurveySP_GetPatientSurveyCount = "GetPatientSurveyCount";
        #endregion

        #region 病人症状 （废弃的）
        internal const string PatientSP_AddSymptomRecordes = "AddSymptomRecordes";
        internal const string PatientSP_UpdateSymptomRecordes = "UpdateSymptomRecordes";
        internal const string PatientSP_DelSymptomRecordes = "DelSymptomRecordes";
        internal const string PatientSP_GetSymptomRecordes = "GetSymptomRecordes";
        internal const string PatientSP_GetSymptomRecordesList = "GetSymptomRecordesList";
        #endregion

        #region 病人症状
        internal const string PatientSymptomSP_AddCurrentSymptom = "AddCurrentSymptom";
        internal const string PatientSymptomSP_UpdateCurrentSymptom = "UpdateCurrentSymptom" ;
        internal const string PatientSymptomSP_DelCurrentSymptom = "DelCurrentSymptom";
        internal const string PatientSymptomSP_GetCurrentSymptom = "GetCurrentSymptom";
        internal const string PatientSymptomSP_GetCurrentSymptomList = "GetCurrentSymptomList";
        internal const string PatientSymptomSP_GetCurrentSymptomCount = "GetCurrentSymptomCount";
        internal const string PatientSymptomSP_AddSymptomHistory = "AddSymptomHistory";
        internal const string PatientSymptomSP_UpdateSymptomHistory = "UpdateSymptomHistory";
        internal const string PatientSymptomSP_DelSymptomHistory = "DelSymptomHistory";
        internal const string PatientSymptomSP_GetSymptomHistory = "GetSymptomHistory";
        internal const string PatientSymptomSP_GetSymptomHistoryList = "GetSymptomHistoryList";
        internal const string PatientSymptomSP_GetSurveyHistorySymptomList = "GetSurveyHistorySymptomList";
        internal const string PatientSymptomSP_GetSymptomHistoryCount = "GetSymptomHistoryCount";
        internal const string PatientSymptomSP_GetAllSymptomHistory = "GetAllSymptomHistory";
        #endregion

        #region 病人实验室指标  （废弃的）
        internal const string PatientSP_AddLabcheckRecordes = "AddLabcheckRecordes";
        internal const string PatientSP_UpdateLabcheckRecordes = "UpdateLabcheckRecordes";
        internal const string PatientSP_DelLabcheckRecordes = "DelLabcheckRecordes";
        internal const string PatientSP_GetLabcheckRecordes = "GetLabcheckRecordes";
        internal const string PatientSP_GetLabcheckRecordesList = "GetLabcheckRecordesList";
        #endregion 

        #region 病人实验室指标
        internal const string PatientIndicatorSP_AddCurrentIndicator = "AddCurrentIndicator";
        internal const string PatientIndicatorSP_UpdateCurrentIndicator = "UpdateCurrentIndicator";
        internal const string PatientIndicatorSP_DelCurrentIndicator = "DelCurrentIndicator";
        internal const string PatientIndicatorSP_GetCurrentIndicator = "GetCurrentIndicator";
        internal const string PatientIndicatorSP_GetCurrentIndicatorList = "GetCurrentIndicatorList";
        internal const string PatientIndicatorSP_GetCurrentIndicatorCount = "GetCurrentIndicatorCount";
        internal const string PatientIndicatorSP_AddIndicatorHistory = "AddIndicatorHistory";
        internal const string PatientIndicatorSP_UpdateIndicatorHistory = "UpdateIndicatorHistory";
        internal const string PatientIndicatorSP_DelIndicatorHistory = "DelIndicatorHistory";
        internal const string PatientIndicatorSP_GetIndicatorHistory = "GetIndicatorHistory";
        internal const string PatientIndicatorSP_GetIndicatorHistoryList = "GetIndicatorHistoryList";
        internal const string PatientIndicatorSP_GetSurveyHistoryIndicatorList = "GetSurveyHistoryIndicatorList";
        internal const string PatientIndicatorSP_GetIndicatorHistoryCount = "GetIndicatorHistoryCount";
        #endregion

        #region 病人治疗 （治疗）
        internal const string PatientSP_GetTreatmentRecordeList = "GetTreatmentRecordeList";
        internal const string PatientSP_AddTreatmentRecorde = "AddTreatmentRecord";
        internal const string PatientSP_UpdateTreatmentRecord = "UpdateTreatmentRecord";
        internal const string PatinetSP_StopTreatmentRecord = "StopTreatmentRecord";
        internal const string PatientSP_DelTreatmentRecordes = "DelTreatmentRecordes";
        internal const string PatientSP_GetTreatmentRecord = "GetTreatmentRecorde";
        internal const string PatientSP_GetAllTreatmentHistory = "GetAllTreatmentHistory";
        #endregion 

        #region 病人治疗
        internal const string PatientTreatmentSP_AddCurrentTreatment = "AddCurrentTreatment";
        internal const string PatientTreatmentSP_UpdateCurrentTreatment = "UpdateCurrentTreatment";
        internal const string PatientTreatmentSP_UpdateCurrentTreatmentStatus = "UpdateCurrentTreatmentStatus";
        internal const string PatientTreatmentSp_StopCurrentTreatment = "StopCurrentTreatment";
        internal const string PatientTreatmentSP_DelCurrentTreatment = "DelCurrentTreatment";
        internal const string PatientTreatmentSP_GetCurrentTreatment = "GetCurrentTreatment";
        internal const string PatientTreatmentSP_GetCurrentTreatmentList = "GetCurrentTreatmentList";
        internal const string PatientTreatmentSP_GetCurrentTreatmentCount = "GetCurrentTreatmentCount";
        internal const string PatientTreatmentSP_AddTreatmentHistory = "AddTreatmentHistory";
        internal const string PatientTreatmentSP_UpdateTreatmentHistory = "UpdateTreatmentHistory";
        internal const string PatientTreatmentSP_DelTreatmentHistory = "DelTreatmentHistory";
        internal const string PatientTreatmentSP_GetTreatmentHistory = "GetTreatmentHistory";
        internal const string PatientTreatmentSP_GetTreatmentHistoryList = "GetTreatmentHistoryList";
        internal const string PatientTreatmentSP_GetTreatmentHistoryCount = "GetTreatmentHistoryCount";
        #endregion

        #region 病人体重
        internal const string PatientWeightSP_AddCurrentWeight = "AddCurrentWeight";
        internal const string PatientWeightSP_UpdateCurrentWeight = "UpdateCurrentWeight";
        internal const string PatientWeightSP_DelCurrentWeight = "DelCurrentWeight";
        internal const string PatientWeightSP_GetCurrentWeight = "GetCurrentWeight";
        internal const string PatientWeightSP_GetCurrentWeightCount = "GetCurrentWeightCount";
        internal const string PatientWeightSP_AddWeightHistory = "AddWeightHistory";
        internal const string PatientWeightSP_UpdateWeightHistory = "UpdateWeightHistory";
        internal const string PatientWeightSP_DelWeightHistory = "DelWeightHistory";
        internal const string PatientWeightSP_GetWeightHistory = "GetWeightHistory";
        internal const string PatientWeightSP_GetWeightHistoryList = "GetWeightHistoryList";
        internal const string PatientWeightSP_GetWeightHistoryCount = "GetWeightHistoryCount";
        internal const string PatientWeightSP_GetAllWeightHistory = "GetAllWeightHistory";
        #endregion

        #region 病人身高
        internal const string PatientWeightSP_UpdatePatientHeight = "UpdatePatientHeight";
        internal const string PatientWeightSP_GetPatientHeight = "GetPatientHeight";
        #endregion

        #region 圈子
        internal const string GroupSP_AddGroup = "AddGroup";
        internal const string GroupSP_DelGroup = "DelGroup";
        internal const string GroupSP_InvalidateGroup = "InvalidateGroup";
        internal const string GroupSP_UpdateGroup = "UpdateGroup";
        internal const string GroupSP_GetGroup = "GetGroup";
        internal const string GroupSP_GetGroupList = "GetGroupList";
        internal const string GroupSP_GetTopGroups = "GetTopGroups";
        internal const string GroupSP_GetGroupsByUserId = "GetGroupsByUserId";
        internal const string GroupSP_UpdateGroupTopicNum = "UpdateGroupTopicNum";
        internal const string GroupSP_UpdateGroupReplyNum = "UpdateGroupReplyNum";
        internal const string GroupSP_UpdateGroupUserNum = "UpdateGroupUserNum";
        internal const string GroupSP_IncreaseGroupHitNum = "IncreaseGroupHitNum";
        internal const string GroupSP_ChangeLatestTopic = "ChangeLatestTopic";
        internal const string GroupSP_AddGroupInvite = "AddGroupInvite";
        internal const string GroupSP_GetGroupInviteList = "GetGroupInviteList";
        internal const string GroupSP_DelGroupInvite = "DelGroupInvite";
        
        #endregion

        #region 圈子分类
        internal const string GroupTypeSP_AddGroupType = "AddGroupType";
        internal const string GroupTypeSP_DelGroupType = "DelGroupType";
        internal const string GroupTypeSP_UpdateGroupType = "UpdateGroupType";
        internal const string GroupTypeSP_GetGroupType = "GetGroupType";
        internal const string GroupTypeSP_GetGroupTypeByDiseaseType = "GetGroupTypeByDiseaseType";
        internal const string GroupTypeSP_GetGroupTypeList = "GetGroupTypeList";
        #endregion

        #region 圈子新闻
        internal const string GroupNewsSP_AddGroupNews = "AddGroupNews";
        internal const string GroupNewsSP_DelGroupNews = "DelGroupNews";
        internal const string GroupNewsSP_UpdateGroupNews = "UpdateGroupNews";
        internal const string GroupNewsSP_GetGroupNews = "GetGroupNews";
        internal const string GroupNewsSP_GetGroupNewsList = "GetGroupNewsList";
        internal const string GroupNewsSP_GetTopGroupNews = "GetTopGroupNews";

        internal const string GroupNewsSP_AddNewsComment = "AddNewsComment";
        internal const string GroupNewsSP_UpdateNewsComment = "UpdateNewsComment";
        internal const string GroupNewsSP_DelNewsComment = "DelNewsComment";
        internal const string GroupNewsSP_GetNewsCommentCount = "GetNewsCommentCount";
        internal const string GroupNewsSP_GetNewsComment = "GetNewsComment";
        internal const string GroupNewsSP_GetNewsCommentList = "GetNewsCommentList";
        
        internal const string GroupNewsSP_AddNewsCommentInfo = "AddNewsCommentInfo";
        internal const string GroupNewsSP_UpdateNewsCommentInfo = "UpdateNewsCommentInfo";
        internal const string GroupNewsSP_DelNewsCommentInfo = "DelNewsCommentInfo";
        internal const string GroupNewsSP_GetNewsCommentInfoCount = "GetNewsCommentInfoCount";
        internal const string GroupNewsSP_GetNewsCommentInfo = "GetNewsCommentInfo";
        internal const string GroupNewsSP_GetNewsCommentInfoList = "GetNewsCommentInfoList";
        #endregion

        #region 活动新闻
        internal const string ActivityNewsSP_AddActivityNews = "AddActivityNews";
        internal const string ActivityNewsSP_DelActivityNews = "DelActivityNews";
        internal const string ActivityNewsSP_UpdateActivityNews = "UpdateActivityNews";
        internal const string ActivityNewsSP_GetActivityNews = "GetActivityNews";
        internal const string ActivityNewsSP_GetActivityNewsList = "GetActivityNewsList";
        #endregion

        #region 新闻公告
        internal const string NewsSP_AddNewsInfo = "AddNews";
        internal const string NewsSP_DelNewsInfo = "DelNews";
        internal const string NewsSP_UpdateNewsInfo = "UpdateNews";
        internal const string NewsSP_GetNewsInfo = "GetNews";
        internal const string NewsSP_GetNewsInfoList = "GetNewsList";
        internal const string NewsSP_GetBulletinList = "GetBulletinList";
        internal const string NewsSP_GetPagedNewsInfoList = "GetNewsInfoList";
        #endregion

        #region 用户活动
        internal const string UserActivitySP_AddUserActivity = "AddUserActivity";
        internal const string UserActivitySP_DelUserActivity = "DelUserActivity";
        internal const string UserActivitySP_UpdateUserActivity = "UpdateUserActivity";
        internal const string UserActivitySP_CheckUserActivity = "CheckUserActivity";
        internal const string UserActivitySP_GetUserActivity = "GetUserActivity";
        internal const string UserActivitySP_GetUserActivityList = "GetUserActivityList";
        #endregion

        #region 组成员
        internal const string GroupUserSP_AddGroupUser = "AddGroupUser";
        internal const string GroupUserSP_DelGroupUser = "DelGroupUser";
        internal const string GroupUserSP_UpdateGroupUserRole = "UpdateGroupUserRole";
        internal const string GroupUserSP_GetGroupUser = "GetGroupUser";
        internal const string GroupUserSP_GetGroupUserList = "GetGroupUserList";
        internal const string GroupUserSP_GetTopGroupUsers = "GetTopGroupUsers";
        internal const string GroupUserSP_UpdateGroupUserTopicNum = "UpdateGroupUserTopicNum";
        internal const string GroupUserSP_UpdateGroupUserReplyNum = "UpdateGroupUserReplyNum";
        internal const string GroupUserSP_GetGroupJoinApplyList = "GetGroupJoinApplyList";
        #endregion

        #region 主题
        internal const string TopicSP_AddTopic = "AddTopic";
        internal const string TopicSP_DelTopic = "DelTopic";
        internal const string TopicSP_UpdateTopic = "UpdateTopic";
        internal const string TopicSP_GetTopic = "GetTopic";
        internal const string TopicSP_UpdateLatestReply = "UpdateLatestReply";  //添加回复
        internal const string TopicSP_ChangeLatestReply = "ChangeLatestReply";  //删除回复
        internal const string TopicSP_UpdateLatestReplyTime = "UpdateLatestReplyTime";
        internal const string TopicSP_UpdateTopicHits = "UpdateTopicHits";
        internal const string TopicSP_GetTopicList = "GetTopicList";
        internal const string TopicSP_GetTopTopics = "GetTopTopics";
        internal const string TopicSP_GetBBSTopTopics = "GetBBSTopTopics";
        internal const string TopicSP_CheckLasttestTopic = "CheckLasttestTopic";
        internal const string TopicSP_UpdateTopicLevel = "UpdateTopicLevel";
        internal const string TopicSP_UpdateTopicSort = "UpdateTopicSort";
        internal const string TopicSP_UpdateBestTopic = "UpdateBestTopic";
        internal const string TopicSP_UpdateTitleColor = "UpdateTitleColor";
        #endregion

        #region 回复
        internal const string ReplySP_AddReply = "AddReply";
        internal const string ReplySP_DelReply = "DelReply";
        internal const string ReplySP_DelAllReply = "DelAllReply";
        internal const string ReplySP_UpdateReply = "UpdateReply";
        internal const string ReplySP_GetReply = "GetReply";
        internal const string ReplySP_GetReplyList = "GetReplyList";
        #endregion

        #region Tag
        internal const string TagSP_AddTag = "AddTag";
        internal const string TagSP_AddTagRelation = "AddTagsRelation";
        internal const string TagSP_DelTagRelation = "DelTagsRelation";
        internal const string TagSP_GetHotTags = "GetHotTagsAsPagesOrdByCount";
        internal const string TagSP_GetTopicByTags = "GetTopicByTagAsPages";
        internal const string TagSP_GetTagListByObjId = "GetTagsByObjID";
        internal const string TagSP_UpdateTagInfo = "UpdateTagInfo";
        internal const string TagSP_GetTagByName = "GetTagByName";
        internal const string TagSP_GetLogTopicByTags = "GetLogTopicByTagAsPages";
        #endregion
        #region 留言
        internal const string CommentSP_AddComment = "AddComment";
        internal const string CommentSP_DelComment = "DelComment";
        internal const string CommentSP_UpdateComment = "UpdateComment";
        internal const string CommentSP_GetComment = "GetComment";
        internal const string CommentSP_GetCommentList = "GetCommentList";
        internal const string CommentSP_UpdateCommentState = "UpdateCommentState";
        internal const string CommentSP_GetCommentReplyListByUser = "GetCommentReplyListByUser";
        internal const string CommentSP_GetReplyListByCommentId = "GetReplyListByCommentId";
        internal const string CommentSP_GetAllReplyListByCommentId = "GetAllReplyListByCommentId";
        
        #endregion

        #region 用户间交互
        internal const string ActionSP_AddAction = "AddAction";
        internal const string ActionSP_DelAction = "DelAction";
        internal const string ActionSP_UpdateAction = "UpdateAction";
        internal const string ActionSP_GetAction = "GetAction";
        internal const string ActionSP_GetActionList = "GetActionList";
        internal const string ActionSP_GetActionListToUser = "GetActionListToUser";
        internal const string ActionSP_UpdateActionState = "UpdateActionState";
        #endregion

        #region 好友
        internal const string FriendSP_AddFriend = "AddFriend";
        internal const string FriendSP_DelFriend = "DelFriend";
        internal const string FriendSP_UpdateFriend = "UpdateFriend";
        internal const string FriendSP_GetFriend = "GetFriend";
        internal const string FriendSP_GetFriendList = "GetFriendList";
        internal const string FriendSP_UpdateFriendState = "UpdateFriendState";
        #endregion

        #region 日志主题
        internal const string LogTopicSP_AddLogTopic = "AddLogTopic";
        internal const string LogTopicSP_DelLogTopic = "DelLogTopic";
        internal const string LogTopicSP_UpdateLogTopicHits = "UpdateLogTopicHits";
        internal const string LogTopicSP_UpdateLogTopicReplyNum = "UpdateLogTopicReplyNum";
        internal const string LogTopicSP_UpdateLogTopic = "UpdateLogTopic";
        internal const string LogTopicSP_GetLogTopic = "GetLogTopic";
        internal const string LogTopicSP_GetLogTopicList = "GetLogTopicList";
        internal const string LogTopicSP_GetLogTopicListByDisease = "GetLogTopicListByDisease";
        #endregion

        #region 日志评论
        internal const string LogCommentSP_AddLogComment = "AddLogComment";
        internal const string LogCommentSP_DelLogComment = "DelLogComment";
        internal const string LogCommentSP_UpdateLogComment = "UpdateLogComment";
        internal const string LogCommentSP_GetLogComment = "GetLogComment";
        internal const string LogCommentSP_GetLogCommentList = "GetLogCommentList";
        internal const string LogCommentSP_GetLattestLogCommentByUser = "GetLattestLogCommentByUser";
        internal const string LogCommentSP_GetLogCommentListByUserId = "GetLogCommentListByUserId";
        internal const string LogCommentSP_UpdateLogCommentState = "UpdateLogCommentState";
        internal const string LogCommentSP_GetLogCommentReplyList = "GetLogCommentReplyList";
        internal const string LogCommentSP_GetNewLogCommentCount = "GetNewLogCommentCount";
        internal const string LogCommentSP_UpdateLogCommentStateByUserId = "UpdateLogCommentStateByUserId";
        #endregion
        #region HyperLink
        internal const string HyperLinkSP_AddHyperLink = "AddHyperLink";
        internal const string HyperLinkSP_DelHyperLink = "DelHyperLink";
        internal const string HyperLinkSP_UpdateHyperLink = "UpdateHyperLink";
        internal const string HyperLinkSP_GetHyperLink = "GetHyperLink";
        internal const string HyperLinkSP_GetHyperLinkList = "GetHyperLinkList";
        #endregion

        #region 推荐用户
        internal const string RecommendUserSP_RecommendUserAdd = "RecommendUserOfDiseaseAdd";
        internal const string RecommendUserSP_RecommendUserDel = "RecommendUserOfDiseaseDel";
        internal const string RecommendUserSP_RecommendUserUpdate = "RecommendUserOfDiseaseUpdate";
        internal const string RecommendUserSP_RecommendUserGet = "RecommendUserGet";
        internal const string RecommendUserSP_RecommendUserGetList = "RecommendUserOfDiseaseGetList";
        #endregion

        #region 指定活跃用户
        internal const string ActiveUserSP_ActiveUserAdd = "ActiveUserAdd";
        internal const string ActiveUserSP_ActiveUserDel = "ActiveUserDel";
        internal const string ActiveUserSP_ActiveUserUpdate = "ActiveUserUpdate";
        internal const string ActiveUserSP_ActiveUserGet = "ActiveUserGet";
        internal const string ActiveUserSP_ActiveUserGetList = "ActiveUserGetList";
        internal const string ActiveUserSP_ActiveUserIntroGetList = "ActiveUserIntroGetList";
        #endregion
        
        #region 更新提示邮件
        internal const string UserSP_GetUpdateHintEamilReceiverList = "GetUpdateHintEamilReceiverList";
        #endregion

        #region 用户动态
        internal const string UserActionSP_AddUserAction = "AddUserAction";
        internal const string UserActionSP_DelUserAction = "DelUserAction";
        internal const string UserActionSP_GetUserActionList = "GetUserActionList";
        internal const string UserActionSP_GetFriendActionList = "GetFriendActionList";
        internal const string UserActionSP_GetAllFriendActionList = "GetAllFriendActionList";
        internal const string UserActionSP_GetPatientsLikeMeActionList = "GetPatientsLikeMeActionList";
        #endregion

        #region 用户积分
        internal const string UserSp_UpdateCreditsAll = "UpdateCreditsAll";
        internal const string UserSp_UpdateCredtis = "UpdateCredits";
        internal const string UserSp_UpdateExtCreditsAll = "UpdateExtCreditsAll";
        internal const string UserSp_UpdatePosts = "UpdatePosts";
        internal const string UserSp_UpdateDigestPosts = "UpdateDigestPosts";
        internal const string UserSp_UpdateCreditsByDigest = "UpdateCreditsByDigest";
        #endregion


        internal static string GetFullName(string name)
        {
            return name;
        }

        //添加病人Survey,采用事务方式
        internal static int AddPatientSurvey(SqlTransaction ts, PatientSurveyInfo psInfo)
        {
            SqlParameter[] outParms = new SqlParameter[]  {
                new SqlParameter("@PRId", SqlDbType.Int),
                new SqlParameter("@RecordDate", SqlDbType.DateTime),
                new SqlParameter("@UpdateDate", SqlDbType.DateTime),
                new SqlParameter("@SurveyType", SqlDbType.Int),
                new SqlParameter("@Id", SqlDbType.Int)
            };
            outParms[0].Value = psInfo.PRId;
            outParms[1].Value = psInfo.RecordDate;
            outParms[2].Value = psInfo.UpdateDate;
            outParms[3].Value = psInfo.SurveyType;
            outParms[4].Direction = ParameterDirection.Output;

            SqlHelper.ExecuteNonQuery(ts, CommandType.StoredProcedure, PatientSurveySP_AddPatientSurvey, outParms);

            return Convert.ToInt32(outParms[4].Value.ToString());
        }

        internal static bool UpdatePatientSurvey(SqlTransaction ts, PatientSurveyInfo psInfo)
        {

            SqlHelper.ExecuteNonQuery(ts, PatientSurveySP_UpdatePatientSurvey,
                psInfo.Id,
                psInfo.PRId,
                psInfo.RecordDate,
                psInfo.UpdateDate
                );

            return true;
        }
    }
}
